using System.Collections.Generic;
using System.Linq;

namespace Taobao.Tools2.Domain.EntityFramework.Mappings.Strategies
{
    public class CompositeMappingStrategy : IMappingStrategy
    {
        public ICollection<IMappingStrategy> Strategies { get; set; }

        public string To(string from)
        {
            return Strategies.Aggregate(from, (current, strategy) => strategy.To(current));
        }
    }
}